#ifndef AI_MODEL_CONFIG_H
#define AI_MODEL_CONFIG_H

#include <string>
#include <map>
#include <vector>

enum class AIModelType {
    DSAI,    // DeepSeek AI
    UEAI,    // UESOFT AI  
    OPAI     // OpenAI
};

struct ModelVersion {
    std::string version_id;
    std::string display_name;
    std::string api_endpoint;
    std::string api_key_env;  // 环境变量名
    int max_tokens;
    bool supports_streaming;
};

class AIModelConfig {
public:
    AIModelConfig();
    
    // 模型管理
    void RegisterModel(AIModelType type, const std::string& version_id, 
                      const ModelVersion& version);
    bool SetCurrentModel(AIModelType type, const std::string& version_id = "");
    
    // 获取模型信息
    ModelVersion GetCurrentModel() const;
    std::vector<std::string> GetAvailableVersions(AIModelType type) const;
    std::string GetModelDisplayName(AIModelType type, const std::string& version_id = "") const;
    
    // 配置验证
    bool ValidateConfig() const;
    std::string GetApiKey() const;
    
    // 预设模型
    void SetupPresetModels();
    
private:
    std::map<AIModelType, std::map<std::string, ModelVersion>> m_models;
    AIModelType m_currentType;
    std::string m_currentVersion;
    
    ModelVersion CreateDSModel(const std::string& version_id, const std::string& display_name);
    ModelVersion CreateUEAIModel(const std::string& version_id, const std::string& display_name);
    ModelVersion CreateOPAIModel(const std::string& version_id, const std::string& display_name);
};

#endif // AI_MODEL_CONFIG_H
